'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

/**
 * 记录最大值
 * @param {Number} peak
 */
const memoPeak = (peak = 0) => {
  return (num = 0) => {
    if (num > peak) {
      peak = num;
    }
    return peak;
  };
};

exports.memoPeak = memoPeak;
